
import java.util.*;
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){

            int n = Integer.parseInt(sc.next());
            String str = sc.nextLine();

            System.out.println(help(n,str));
        }
    }

    public static String help(int n,String str){
        if(str == null) return null;
        StringBuilder sb = new StringBuilder();
        if(n >= str.length()){
            for (int i = str.length()-1; i >= 0 ; i--) {
                sb.append(str.charAt(i));
            }
        }else{
            int p = str.length()/n;
            String[] strs = new String[p];
            for (int i = 0; i < p; i++) {
                strs[i] = str.substring(i*n,i*n+n);
            }
            for (int i = 0; i < p; i++) {
                String temp = strs[i];
                for (int j = temp.length()-1; j >= 0 ; j--) {
                    sb.append(temp.charAt(j));
                }
            }
            sb.append(str.substring(n*p));
        }

        String res = sb.toString();
        return res;
    }

}
